home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / wp / esee2.0.lha / ESEE2 / GoldED / Tools / GEDScan / PROC.e < prev    next >
Encoding:
Text File  |  1994-10-22  |  1.6 KB  |  74 lines

  1. -> Amiga E PROC scanner for GoldED's function-scanning features.
  2. -> This piece of software is part of the ESEE 2.x distribution.
  3.  
  4. -> ESEE (E Source Editor Environment) is © 1994 by Leon Woestenberg.
  5. -> Email me for comments at 'leon@stack.urc.tue.nl'.
  6.  
  7. ;OPT ASM
  8.  
  9.   MOVE.L A1,-(A7)
  10.   MOVE.L (A0),A1
  11. test_for_proc:
  12.   CMP.B #80,(A1)
  13.   BEQ.S maybe_proc
  14. maybe_export:
  15.   CMP.B #69,(A1)
  16.   BNE.W no_proc_header
  17.   CMP.B #88,1(A1)
  18.   BNE.W no_proc_header
  19.   CMP.B #80,2(A1)
  20.   BNE.W no_proc_header
  21.   CMP.B #79,3(A1)
  22.   BNE.W no_proc_header
  23.   CMP.B #82,4(A1)
  24.   BNE.S no_proc_header
  25.   CMP.B #84,5(A1)
  26.   BNE.S no_proc_header
  27.   CMP.B #32,6(A1)
  28.   BNE.S no_proc_header
  29.   ADDQ.L #7,(A0)
  30.   ADDQ.L #7,A1
  31.   SUBQ.L #7,D0
  32. maybe_proc:
  33.   CMP.B #80,(A1)
  34.   BNE.S no_proc_header
  35.   CMP.B #82,1(A1)
  36.   BNE.S no_proc_header
  37.   CMP.B #79,2(A1)
  38.   BNE.S no_proc_header
  39.   CMP.B #67,3(A1)
  40.   BNE.S no_proc_header
  41.   ADDQ.L #4,(A0)
  42.   ADDQ.L #4,A1
  43.   SUBQ.L #4,D0
  44. skip_spaces:
  45.   CMP.B #32,(A1)
  46.   BNE.S find_end_of_procname
  47.   SUBQ.L #1,D0
  48.   ADDQ.L #1,(A0)
  49.   ADDQ.L #1,A1
  50.   JMP skip_spaces(PC)
  51. find_end_of_procname:
  52.   ;-> remember linelength in D1, to prevent illegal memory access
  53.   MOVE D0,D1
  54.   ;-> determine the procname length, keep this length into D0
  55.   CLR.L D0
  56. find_space_or_bracket:
  57.   CMP.B #32,(A1)
  58.   BEQ.S finished
  59.   CMP.B #40,(A1)
  60.   BEQ.S finished
  61.   ;-> A1 is the running pointer, and (A0) is frozen to start of procname
  62.   ADDQ.L #1,A1
  63.   ADDQ.L #1,D0
  64.   CMP.B D0,D1
  65.   BEQ.S no_proc_header
  66.   JMP find_space_or_bracket(PC)
  67. no_proc_header:
  68.   CLR.L D0
  69. finished:
  70.   MOVE.L (A7)+,A1
  71.   RTS
  72.  
  73. CHAR '$VER: GoldED_PROC_Scanner 2.0 (22.10.94)',0
  74.